﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ccit.OA.Utils;
using System.Collections.Generic;

namespace Ccit.OA.NewsCenter
{
    public partial class news_viewstat_list : Ccit.Utils.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hdNewsId.Value = (null != Request.QueryString["Id"]) ? Request.QueryString["Id"].ToString() : "";
                lblTitleName.Text = SysInterface.GetNameStrByIdStr("NEWS_A3", "NEWS_A3_10", "NEWS_A3_30", hdNewsId.Value, "");
            }
            BindGrid();
        }

        private void BindGrid()
        {
            SubmitBLL oSubmit = new SubmitBLL();
            string sReader = txtReader.Value.Trim();
            string sNewsId = hdNewsId.Value;
            List<MsViewInfo> lstViewInfo = oSubmit.GetViewInfoByNewsId(sNewsId, sReader);
            gvReaderList.DataSource = lstViewInfo;
            gvReaderList.DataBind();
        }

        protected void lnkSearch_Click(object sender, EventArgs e)
        {
            BindGrid();
        }
    }
}
